export enum ForumStatus {
    UNION_FORUM = 0,  // "联合版面"),
    SELECTABLE = 1,  // "用户可选择的"),
    SELECTED_EXTRA = 2,  // "(用户设置合并默认设置之后)已选择的"),
    SET_BY_ADMIN = 3,  // "版主设置的"),
    IS_SET = 4,  // "是个主题集合"),
    IS_FORUM = 5,  // "是个到版面的镜像"),
    THIS_FORUM = 6,  // "是当前所在的版面"),
    SELECTED = 7,  // "用户选择的"),
    NOT_SELECTED = 8,  // "用户未选择的"),
    SELECTED_DEFAULT = 9,  // "默认选择的"),
    NOT_SELECTED_DEFAULT = 10,  // "默认未选择的"),
    UNKNOWN_1 = 11,  // "未知状态_1"),
    UNKNOWN_2 = 12,  // "未知状态_2"),
    UNKNOWN_3 = 13,  // "未知状态_3"),
}


export const parseForumStatus = (bit: number): ForumStatus[] => {
    const status: ForumStatus[] = []

    for (let i = 0; i < 32; i++) {
        if ((bit & Math.pow(2, i)) !== 0) {
            status.push(i as ForumStatus)
        }
    }

    return status
}